import R from "@common/type/response";
import { NextApiRequest, NextApiResponse } from "next";


function getConfig(req: NextApiRequest, res: NextApiResponse) {
  R.success(res);
}

function postConfig(req: NextApiRequest, res: NextApiResponse) {
  R.success(res);
}

export async function handler(req: NextApiRequest, res: NextApiResponse) {
  const { method } = req;
  switch (method) {
    case "GET":
       getConfig(req, res);
    case "POST":
        postConfig(req, res);
    default:
      return res.status(405).end(`Method ${method} Not Allowed`);
  }
}

